<<<<<<< HEAD
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 * 额度
 * @author chenhuan
 *
 */
class Amount extends CI_Controller {
	
	private $tab = 'borrow';
	private $subtab = 'amount';
	
	function __construct(){
		parent::__construct();
		/** 登陆验证 */
		if(!isset($_SESSION)){
		    session_start();
		}
		$admin = $this->session->userdata('admin_user');
		if(!$admin || !isset($admin['user_id'])){
			header('Location: /sys_admin/login');
			exit;
		}
	}
	
	/**
	 * 额度申请列表
	 */
	function applylist(){
		$per_page 	= $this->input->get('per_page')?$this->input->get('per_page'):0;
		
		$this->load->model('User_amount_model');
		$data['page_size']  = sys_admin_LIST_PAGE_SIZE;
		$data['page_start'] = (int)$per_page;
		$vdata = $this->User_amount_model->get_amount_apply_list($data);
		$this->load->library('pagination');
		$config['base_url'] = '/sys_admin/amount/applylist/?';
		$config['total_rows'] = $vdata['amount_apply_count'];
		$config['per_page'] = sys_admin_LIST_PAGE_SIZE; 
		$this->pagination->initialize($config);
		$vdata['amount_status'] = $this->User_amount_model->arrays('amount_status');//标种
		
		$vdata['tab'] = $this->tab;
		$vdata['sub'] = $this->subtab;
		
		$this->load->view('/sys_admin/borrow/amount_apply_list', $vdata);
		
	}
	
	/**
	 * 额度审核
	 */
	function verify(){
		$id 			= $this->input->post("id");
		$fstatus 		= $this->input->post("fstatus");
		$verify_remark	= $this->input->post("verify_remark");
		
		$data["id"]					= $id;
		$data["fstatus"]			= $fstatus;
  		$data["verify_remark"]		= $verify_remark;
  		$data["verify_time"]		= time();
  		$data["verify_ip"]			= $this->js->get_ip();
  		$data['admin_user_id'] 		= 0;
  		$this->load->model('User_amount_model');
  		$this->load->model('log_model');$this->log_model->add_log('[审核][借款额度]');
		echo $this->User_amount_model->add_amount_log($data);
	}
	
=======
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 * 额度
 * @author chenhuan
 *
 */
class Amount extends CI_Controller {
    
	private $tab = 'borrow';
	private $subtab = 'amount';
	
	function __construct(){
		parent::__construct();
		/** 登陆验证 */
		if(!isset($_SESSION)){
		    session_start();
		}
		$admin = $this->session->userdata('admin_user');
		if(!$admin || !isset($admin['user_id'])){
			header('Location: /sys_admin/login');
			exit;
		}
	}
	
	/**
	 * 额度申请列表
	 */
	function applylist(){
		$per_page 	= $this->input->get('per_page')?$this->input->get('per_page'):0;
		
		$this->load->model('User_amount_model');
		$data['page_size']  = sys_admin_LIST_PAGE_SIZE;
		$data['page_start'] = (int)$per_page;
		$vdata = $this->User_amount_model->get_amount_apply_list($data);
		$this->load->library('pagination');
		$config['base_url'] = '/sys_admin/amount/applylist/?';
		$config['total_rows'] = $vdata['amount_apply_count'];
		$config['per_page'] = sys_admin_LIST_PAGE_SIZE; 
		$this->pagination->initialize($config);
		$vdata['amount_status'] = $this->User_amount_model->arrays('amount_status');//标种
		
		$vdata['tab'] = $this->tab;
		$vdata['sub'] = $this->subtab;
		
		$this->load->view('/sys_admin/borrow/amount_apply_list', $vdata);
		
	}
	
	/**
	 * 额度审核
	 */
	function verify(){
		$id 			= $this->input->post("id");
		$fstatus 		= $this->input->post("fstatus");
		$verify_remark	= $this->input->post("verify_remark");
		
		$data["id"]					= $id;
		$data["fstatus"]			= $fstatus;
  		$data["verify_remark"]		= $verify_remark;
  		$data["verify_time"]		= time();
  		$data["verify_ip"]			= $this->js->get_ip();
  		$data['admin_user_id'] 		= 0;
  		$this->load->model('User_amount_model');
  		$this->load->model('log_model');$this->log_model->add_log('[审核][借款额度]');
		echo $this->User_amount_model->add_amount_log($data);
	}
	
>>>>>>> d47623b610d79a4eeb489500830c00d70933f414
}